payments = float(input())
if 0 < payments <= 50000:
    revenues = payments*0.01
elif 50000 < payments <= 75000:
    revenues = 50000*0.01 + (payments-50000)*0.02
elif 75000 < payments <= 100000:
    revenues = 50000*0.01 + 25000*0.02 + (payments-75000)*0.03
elif 100000 < payments <= 250000:
    revenues = 50000*0.01 + 25000*0.02 + 25000*0.03 + (payments-100000)*0.04
elif 250000 < payments <= 500000:
    revenues = 50000*0.01 + 25000*0.02 + 25000*0.03 + 150000*0.04 + (payments-250000)*0.05
elif payments > 500000:
    revenues = 50000*0.01 + 25000*0.02 + 25000*0.03 + 150000*0.04 + 250000*0.05 + (payments-500000)*0.06
print(f'{revenues:.2f}')